home *** CD-ROM | disk | FTP | other *** search
/ CICA 1993 April / CICA MS Windows - April 1993.iso / unzipped / programr / toolbar / toolbar.h < prev    next >
C/C++ Source or Header  |  1992-07-01  |  1KB  |  52 lines

  1. /*
  2.  *    Include file for the TOOLBAR library
  3.  *    Copyright (C) Stephen Chung, 1991.
  4.  *    All rights reserved.
  5.  *
  6.  *    Class wrapper (C) Tim Liddelow 1992
  7.  */
  8.  
  9. #define TOOLBARCLASS        "Toolbar"
  10. #define TOOLBARBUTTONCLASS  "Toolbar Button"
  11.  
  12. typedef struct {
  13.     int id;                     /* Initialize these fields */
  14.     int x, y;
  15.     int width, height;
  16.     int state, cycle;
  17.     char *disabled;
  18.     char *undepressed;
  19.     char *depressed;
  20.     char *grayed;
  21.     char *pressing;
  22.  
  23.     HWND hwnd;                  /* The following fields are only used by */
  24.     int oldstate;               /* the library. DO NOT TOUCH THEM.       */
  25. } TOOLBARICON;
  26.  
  27. class ToolBar
  28. {
  29.     HWND hwnd;
  30.     static BOOL ClassRegistered;
  31.     static BOOL Capturing;
  32.  
  33.     public:
  34.         static long FAR PASCAL ToolbarProc (HWND, WORD, WORD, LONG);
  35.         static long FAR PASCAL ToolbarButtonProc (HWND, WORD, WORD, LONG);
  36.  
  37.         ToolBar(HWND parent, int x, int y, int width, int height,
  38.                     int thickness, int id, int n, HANDLE hInstance,
  39.                     TOOLBARICON *icons, char *xcursor);
  40.         void Show() { ShowWindow (hwnd, SW_SHOW); };
  41.         void Hide() { ShowWindow (hwnd, SW_HIDE); };
  42.         HWND Window() { return hwnd; };
  43.         void Resize (int x, int y, int width, int height, BOOL bRepaint);
  44.         void EnableToolbarButton(int id, BOOL enabled);
  45.         HWND GetToolbarButton (int id, TOOLBARICON *ip);
  46.         void ModifyToolbarButton (TOOLBARICON *icon);
  47. };
  48.  
  49.  
  50.  
  51. extern void Create3DEffect (HDC, RECT *, int, int);
  52.